Skip to content

fix: correct mop intensity code for slider#777

Merged
Lash-L merged 1 commit intomainfrom
fix-mop-intensity-slider
Mar 6, 2026
Merged

fix: correct mop intensity code for slider#777
Lash-L merged 1 commit intomainfrom
fix-mop-intensity-slider

Conversation

@Lash-L
Copy link
Collaborator

@Lash-L Lash-L commented Mar 6, 2026

Some vacs have a slider instead of the normal selection. This should fix the problem.

home-assistant/core#164831

@Lash-L Lash-L requested review from allenporter and Copilot March 6, 2026 02:06
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
roborock/data/v1/v1_clean_modes.py 77.19% <100.00%> (+2.88%) ⬆️
roborock/devices/traits/v1/status.py 96.07% <100.00%> (ø)
tests/devices/traits/v1/test_status.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes water/mop intensity name/code handling for devices that report “water slide mode” (slider-based intensity), aligning water_box_mode codes with the correct user-facing strings and adding regression coverage.

Changes:

  • Add explicit water-slide code→mode mapping (including 200 -> off) and a helper to build water_mode_mapping feature-aware.
  • Update StatusTrait.water_mode_mapping to use the feature-aware mapping helper.
  • Add a unit test validating slider-mode mappings and option ordering.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/devices/traits/v1/test_status.py Adds regression test asserting correct slide-mode code→string mapping and options list.
roborock/devices/traits/v1/status.py Switches water_mode_mapping to use the new feature-aware mapping helper.
roborock/data/v1/v1_clean_modes.py Introduces WATER_SLIDE_MODE_MAPPING and get_water_mode_mapping(), and updates slide-mode water options to include OFF.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Lash-L Lash-L merged commit f83f36a into main Mar 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants